package com.zd.service.lmpl;/**
 * @Description: FreightinformationServicelmpl
 * @Author:pioneer
 * @Date: 2021-07-02
 * @Version:v1.0
 */

import com.zd.mapper.FreightinformationMapper;
import com.zd.service.lnter.FreightinformationServicelnter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Description: FreightinformationServicelmpl
 * @Author:pioneer
 * @Date: 2021-07-02
 * @Version:v1.0
 */
@Service
public class FreightinformationServicelmpl implements FreightinformationServicelnter {
    @Autowired
    private FreightinformationMapper freightinformationMapper;
    /**
     * 根据货运单号删除货运信息
     *
     * @param freightinformation 货物单号
     * @return 返回数值判断是否删除成功
     */
    @Override
    public int deletefreightInformation(String freightinformation) {
        return freightinformationMapper.deletefreightInformation (freightinformation);
    }



    /**
     * 根据货运单号修改货运信息
     *
     * @param orderNumber          订单编号
     * @param dateArrival          承诺日期
     * @param descriptionGoods     货物名称
     * @param quantity             货物数量
     * @param packaging            包装方式
     * @param weight               重量kg
     * @param volume               体积m3立方米
     * @param unitPrice            货物单价
     * @param tollCollectionManner 收费方式
     * @param cost                 基本费用
     * @param picUpCharge          提货费
     * @param deliveryFee          送货费
     * @param cargoValue           货物价值
     * @param premium              保价费用
     * @param unloadFee            卸货费
     * @param elseFee              其它费用
     * @param aggregateAmount      应收总金额
     * @param nowClosed            现收
     * @param paymentMethod        付款方式
     * @param freightCollect       到付
     * @param remark               备注
     * @param freightInformation   货物信息
     * @return 回数值判断是否修改成功
     */
    @Override
    public int updateFreightinformation(String orderNumber, String dateArrival, String descriptionGoods, int quantity, String packaging, int weight, int volume, int unitPrice, String tollCollectionManner, int cost, int picUpCharge, int deliveryFee, int cargoValue, int premium, int unloadFee, int elseFee, int aggregateAmount, int nowClosed, String paymentMethod, int freightCollect, String remark, String freightInformation) {
        return freightinformationMapper.updateFreightinformation (orderNumber,dateArrival,descriptionGoods,quantity,packaging,weight,volume,unitPrice,tollCollectionManner,cost,picUpCharge,deliveryFee,cargoValue,premium,unloadFee,elseFee,aggregateAmount,nowClosed,paymentMethod,freightCollect,remark,freightInformation);
    }
}
